﻿<Window x:Class="BalanceManagerApp.MainWindow"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="BalanceManagerApp" Width="800" Height="600">

    <Window.Resources>
        <ResourceDictionary Source="MainWindowResources.xaml" />
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Menu Grid.Row="0">
            <MenuItem Header="Файл">
                <MenuItem Header="Выход" HorizontalAlignment="Left"/>
            </MenuItem>
            <MenuItem Header="Функции">
                <MenuItem Header="Приход" HorizontalAlignment="Left"/>
                <MenuItem Header="Расход" HorizontalAlignment="Left"/>
                <MenuItem Header="Наименования" HorizontalAlignment="Left"/>
                <MenuItem Header="Отчеты" HorizontalAlignment="Left"/>
                <MenuItem Header="Настройки" HorizontalAlignment="Left"/>
            </MenuItem>
            <MenuItem Header="О программе">
                <MenuItem Header="О программе..." HorizontalAlignment="Left"/>
            </MenuItem>

        </Menu>    
        
        <DockPanel Grid.Row="1">        
            <ListBox DockPanel.Dock="Left" ItemsSource="{Binding Path=Commands}" Width="200" BorderThickness="0">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" Height="16">
                            <Image Source="{Binding Image}" />
                            <Button Content="{Binding DisplayName}" 
                                    Command="{Binding Command}" 
                                    Template="{StaticResource LeftPanelButtonTemplate}"/>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <ContentControl                 
                ContentTemplate="{StaticResource WorkspaceTemplate}" 
                Content="{Binding Path=CurrentWorkspace}" />        
        </DockPanel>
    </Grid>
</Window>